Imports System
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports DotNetNuke.Entities.Modules
Namespace NVPortal.Modules.NVNews.Search

    Public MustInherit Class Main
        Inherits PortalModuleBase

#Region "Event Handlers"
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Try
                'If Not IsPostBack Then
                Dim o_control As PortalModuleBase
                If Request.Item("sch") = "date" Then
                    'load Search usercontrol
                    o_control = CType(Page.LoadControl("~/DesktopModules/NV_News/Display/News/Detail/Search/ResultByDate.ascx"), PortalModuleBase)

                Else
                    'load Search usercontrol
                    o_control = CType(Page.LoadControl("~/DesktopModules/NV_News/Display/News/Detail/Search/SerachResult.ascx"), PortalModuleBase)
                    'execute some here
                End If
                o_control.ModuleConfiguration = Me.ModuleConfiguration
                Me.plhNews.Controls.Add(o_control)
                'End If
            Catch ex As Exception
                ProcessModuleLoadException(Me, ex)
            End Try
        End Sub
#End Region



    End Class

End Namespace
